import { Component, Input, OnInit } from '@angular/core';
import { NzMessageService, NzModalRef } from 'ng-zorro-antd';

@Component({
  selector: 'app-confirm',
  templateUrl: './confirm.component.html',
  styles: [],
})
export class ConfirmComponent implements OnInit {

  @Input() subtitle: string = '确定吗？';
  @Input() okText: string = '确定';
  @Input() cancelText: string = '继续编辑';

  constructor(private modal: NzModalRef,
              public message: NzMessageService,
  ) {
  }

  ngOnInit(): void {

  }

  ok() {
    this.modal.close(true);
  }

  close() {
    this.modal.destroy();
  }

}
